# -*- encoding:utf-8 -*-
# !/usr/bin/env python
'''
    python-0819-04.py
    ======================
    @descript: 异常处理
    @copyright:nnz
    @author:dln
    @date: 2021/8/19 20:03
    @version:v1.0
'''
import traceback

v_result:str=''
v_path='work.txt'
v_lenth=5
try:
    v_in = open(v_path, 'r', encoding='utf-8')
    v_result = v_in.readline(v_lenth)
    while v_result:
        print(v_result)
        v_result = v_in.readline(v_lenth)
except Exception as e:
    traceback.print_exc()
finally:
    if v_in:
        v_in.close()
        pass
    pass


